package com.cxs.plan.mapper;

import com.cxs.plan.VO.FilterUserVO;
import com.cxs.plan.domain.entity.UserWithBill;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Administrator
* @description 针对表【user_with_bill】的数据库操作Mapper
* @createDate 2024-04-07 10:27:20
* @Entity com.cxs.plan.domain.entity.UserWithBill
*/
public interface UserWithBillMapper extends BaseMapper<UserWithBill> {

    List<FilterUserVO> selectByUserId(@Param("billId") Integer billId);

    void insertBatch(@Param("memberIds") List<Integer> memberIds,@Param("billId") Integer id);

    @Delete("delete from user_with_bill where user_id = #{userId} and bill_id = #{billId}")
    void deleteByBillAndUser(@Param("billId") Integer id, @Param("userId") Integer userId);
}




